package com.xiaoc.bulldozer.common.dto;

import com.xiaoc.bulldozer.common.model.StatisticAccount;
import com.xc.framework.common.page.PageDto;
import com.xc.framework.common.page.PageUtil;

/**
 * StatisticAccount 查询Dto
 *
 * @author Danfo Yam
 *
 * @date 2018-11-12 14:51:41
 */
public class StatisticAccountQueryDto extends StatisticAccount {
    
    private static final long serialVersionUID = 1L;

    public StatisticAccountQueryDto(){
        if (this.page == null) {
            this.setPage(1);
        }
    }
    
    /**
     * 当前页码
     */
    private Integer page;

    /**
     * 总行数
     */
    private Integer totalCount;

    /**
     * 起始行
     */
    private Integer offset;

    /**
     * 每页行数
     */
    private Integer limit;


    /**
     * 姓名
     */
    private String name;

    /**
     * 电话号码
     */
    private String phoneNumber;


    /**
     * 开始时间
     */
    private String startTimeStr;

    /**
     * 结束时间
     */
    private String endTimeStr;


    private long startTime;

    private long endTime;


    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
        int[] pager = PageUtil.getPager(page, PageDto.PAGE_SIZE);
        this.setOffset(pager[0]);
        this.setLimit(pager[1]);
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getStartTimeStr() {
        return startTimeStr;
    }

    public void setStartTimeStr(String startTimeStr) {
        this.startTimeStr = startTimeStr;
    }

    public String getEndTimeStr() {
        return endTimeStr;
    }

    public void setEndTimeStr(String endTimeStr) {
        this.endTimeStr = endTimeStr;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }
}
